package cn.stylefeng.guns.sys.modular.system.mapper;

import cn.stylefeng.guns.sys.modular.system.entity.BtyInventory;
import cn.stylefeng.guns.sys.modular.system.entity.DsstoreBill;
import cn.stylefeng.guns.sys.modular.system.model.params.DsstoreBillParam;
import cn.stylefeng.guns.sys.modular.system.model.result.DsstoreBillResult;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author jiangge
 * @since 2020-09-15
 */
public interface DsstoreBillMapper extends BaseMapper<DsstoreBill> {

    /**
     * 获取列表
     *
     * @author jiangge
     * @Date 2020-09-15
     */
    List<DsstoreBillResult> customList(@Param("paramCondition") DsstoreBillParam paramCondition);

    List<DsstoreBillResult> getDsstoreBillList(@Param("paramCondition") DsstoreBillParam paramCondition);

    /**
     * 获取map列表
     *
     * @author jiangge
     * @Date 2020-09-15
     */
    List<Map<String, Object>> customMapList(@Param("paramCondition") DsstoreBillParam paramCondition);

    /**
     * 获取分页实体列表
     *
     * @author jiangge
     * @Date 2020-09-15
     */
    Page<DsstoreBillResult> customPageList(@Param("page") Page page, @Param("param") DsstoreBillParam param);

    /**
     * 获取分页map列表
     *
     * @author jiangge
     * @Date 2020-09-15
     */
    Page<Map<String, Object>> customPageMapList(@Param("page") Page page, @Param("paramCondition") DsstoreBillParam paramCondition);

    /**
     * 获取累计库存数据
     *
     * @param param
     * @return
     */
    Page<DsstoreBillResult> getConutData(@Param("page") Page page, @Param("param") DsstoreBillParam param);

    DsstoreBillResult selectRkAndTotalRkje(@Param("param") BtyInventory params);

    /**
     * 获取门店初期单
     * @param params
     * @return
     */
    List<DsstoreBillResult> selectBillsByBusTypeAndDate(@Param("param") DsstoreBillParam params);

    List<DsstoreBillResult> selectChuQiDanBillsByBusTypeAndDate();

    DsstoreBillResult getConutDataByParam(@Param("param") DsstoreBillParam param);

    void deleteDataByDay(@Param("day")String day);

    void deleteDataByDay2(@Param("day")String day);

    void deleteDataByDayAndIds(@Param("day")String day,@Param("list")List<String> list);

    List<String> selectIdsByDay(@Param("day")String day);

    void deleteDataByIds(@Param("list")List<String> idslist);
}
